<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #d1 {
            color: red;
        }
        div{
            color: green;
        }
        /*important 提示样式的优先级为最高*/
        p{
            color: blue !important;
        }
        #p1{
            color: yellow;
        }
    </style>
</head>
<body>

<div id="d1">
    <p id="p1">这是个p标签</p>
    <span>这是一个span</span>
    <div>
        <p>这是个孙子元素</p>
    </div>
    <a href="http://baidu.com">超链接</a>
</div>

</body>
</html>